#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import os

# input "/a/b/c/d.txt" return ("/a/b/c", "d.txt")
def getDirNameAndBaseName(path):
    return os.path.split(path)

# input "d.txt" return ("d", ".txt")
def getPrefixAndSuffix(filename):
    return os.path.splitext(filename)